package com.thinkgem.jeesite.common.persistence;

import java.io.Serializable;

public class ResponseResult implements Serializable {

	private static final long serialVersionUID = -1659648311860514594L;

	public static final String SUCCESS = "2000"; // 成功
	public static final String SUCCESS_MSG = "处理成功";

	public static final String FAILURE = "2009"; // 失败

	public static final String TIME_OUT = "2002";

	public static final String UNKNOW = "2005";

	/**
	 * 成功构造方法<默认构造函数>
	 */
	public ResponseResult() {
	}
	/**
	 * 成功构造方法<默认构造函数>
	 */
	public ResponseResult(String mac) {
		this.code = SUCCESS;
		this.mac = mac;
		this.time = System.currentTimeMillis();
	}
	/**
	 * 构造方法
	 */
	public ResponseResult(String code, String mac) {
		this.code = code;
		this.mac = mac;
		this.time = System.currentTimeMillis();
	}

	/**
	 * 构造方法
	 */
	public ResponseResult(String code, String mac, Long time) {
		this.code = code;
		this.mac = mac;
		this.time = time;
	}

    /**
     * 构造方法
     */
    public ResponseResult(String code, String mac, String cid, Object data){
        this.code = code;
        this.mac = mac;
        this.cid = cid;
        this.time = System.currentTimeMillis();
        this.data = data;
    }
    public ResponseResult(String code, String mac, String cid,String method, Object data){
        this.code = code;
        this.mac = mac;
        this.cid = cid;
        this.time = System.currentTimeMillis();
        this.data = data;
        this.method = method;
    }
	/**
	 * 返回代码
	 */
	public String code;

	/**
	 * 错误信息
	 */
	public String mac;

	/**
	 * 返回数据
	 */
	public Long time;

    public String cid;
    
    public String getCid() {
		return cid;
	}
	public void setCid(String cid) {
		this.cid = cid;
	}
	public String method;
    public String getMethod() {
		return method;
	}
	public void setMethod(String method) {
		this.method = method;
	}

	/**
     * 返回数据
     */
    public Object data;

	public String getCode(){
		return code;
	}

	public void setCode(String code){
		this.code = code;
	}

	public String getMac(){
		return mac;
	}

	public void setMac(String mac){
		this.mac = mac;
	}

	public Long getTime(){
		return time;
	}

	public void setTime(Long time){
		this.time = time;
	}

    public Object getData(){
        return data;
    }

    public void setData(Object data){
        this.data = data;
    }
}
